<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Kexio 管理系统</title>
  <!-- 引入Element Plus CSS -->
  <link rel="stylesheet" href="https://unpkg.com/element-plus@2.4.4/dist/index.css">
  <!-- 引入Element Plus图标 -->
  <link rel="stylesheet" href="https://unpkg.com/element-plus@2.4.4/dist/index.css">
  <!-- 引入Font Awesome图标 -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <!-- 引入Tailwind CSS -->
  <script src="https://cdn.tailwindcss.com"></script>
  
  <!-- 配置Tailwind CSS自定义颜色和字体 -->
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#000000',
            'primary-hover': '#333333',
            'primary-active': '#222222',
            'primary-weak': 'rgba(0, 0, 0, .05)',
            'text-primary': '#333333',
            'text-secondary': '#666666',
            'text-muted': '#999999',
            'bg-page': '#f5f5f5',
            'bg-panel': '#ffffff',
            'bg-hover': '#eeeeee',
            'border': '#dddddd',
            success: '#22c55e',
            warning: '#f59e0b',
            danger: '#ef4444',
            info: '#3b82f6'
          },
          fontFamily: {
            sans: ['Inter', 'system-ui', 'sans-serif']
          },
          boxShadow: {
            'card': '0 8px 16px rgba(15, 23, 42, .06)',
            'hover': '0 12px 24px rgba(15, 23, 42, .12)',
            'sm': '0 2px 6px rgba(15, 23, 42, .05)',
            'md': '0 6px 12px rgba(15, 23, 42, .08)',
            'lg': '0 10px 20px rgba(15, 23, 42, .10)'
          },
          borderRadius: {
            'sm': '8px',
            'md': '12px',
            'lg': '16px',
            'xl': '20px'
          }
        }
      }
    }
  </script>
  
  <!-- 自定义工具类 -->
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .menu-item-active {
        @apply bg-primary-weak text-primary border-r-4 border-primary;
      }
      .transition-sidebar {
        @apply transition-all duration-300 ease-in-out;
      }
      .scrollbar-hide::-webkit-scrollbar {
        display: none;
      }
      .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
      }
    }
  </style>
  
  <style>
    /* 全局样式重置 */
    body {
      margin: 0;
      padding: 0;
      font-family: 'Inter', system-ui, sans-serif;
      background-color: #f5f5f5;
      color: #333333;
    }
    
    /* 侧边栏样式 */
    .sidebar {
      height: 100vh;
      background-color: white;
      box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
      z-index: 900;
    }
    
    .menu-item {
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .menu-item:hover {
      background-color: #f1f5f9;
    }
    
    /* 顶部导航样式 */
    .navbar {
      height: 60px;
      background-color: white;
      box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
      z-index: 1000;
    }
    
    /* 面包屑样式 */
    .breadcrumb-item {
      color: #94a3b8;
    }
    
    .breadcrumb-item.active {
      color: #000000;
    }
    
    /* 卡片样式 */
    .stat-card {
      transition: all 0.3s ease;
    }
    
    .stat-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
    }
    
    /* 表格样式 */
    .table-row:hover {
      background-color: #f1f5f9;
    }
    
    /* 加载动画 */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    .animate-fadeIn {
      animation: fadeIn 0.3s ease-out;
    }
    
    /* 响应式设计 */
    @media (max-width: 768px) {
      .sidebar {
        transform: translateX(-100%);
        position: fixed;
      }
      
      .sidebar.open {
        transform: translateX(0);
      }
      
      .main-content {
        margin-left: 0 !important;
      }
    }
  </style>
</head>
<body class="bg-bg-page">
  <div class="flex h-screen overflow-hidden">
    <!-- 侧边栏 -->
    <aside id="sidebar" class="sidebar w-60 fixed left-0 top-0 bottom-0 transition-sidebar">
      <!-- Logo区域 -->
      <div class="flex items-center justify-center h-16 border-b border-border">
        <div class="text-primary font-bold text-xl flex items-center">
          <i class="fas fa-cube mr-2"></i>
          <span>Kexio</span>
        </div>
      </div>
      
      <!-- 菜单区域 -->
      <nav class="h-[calc(100vh-100px)] overflow-y-auto scrollbar-hide p-4">
        <div class="mb-4 text-xs text-text-muted uppercase font-semibold pl-2">主导航</div>
        
        <!-- 菜单项 -->
        <div class="space-y-1">
          <a href="#" class="flex items-center px-4 py-3 rounded-md menu-item-active">
            <i class="fas fa-tachometer-alt w-5 text-center mr-3"></i>
            <span>仪表盘</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-users w-5 text-center mr-3"></i>
            <span>用户管理</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-user-shield w-5 text-center mr-3"></i>
            <span>角色权限</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-sitemap w-5 text-center mr-3"></i>
            <span>组织架构</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-file-alt w-5 text-center mr-3"></i>
            <span>文件管理</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-cog w-5 text-center mr-3"></i>
            <span>系统设置</span>
          </a>
        </div>
        
        <div class="my-6 border-t border-border"></div>
        
        <div class="mb-4 text-xs text-text-muted uppercase font-semibold pl-2">扩展功能</div>
        
        <div class="space-y-1">
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-chart-line w-5 text-center mr-3"></i>
            <span>数据分析</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-bell w-5 text-center mr-3"></i>
            <span>消息中心</span>
            <span class="ml-auto bg-danger text-white text-xs px-2 py-0.5 rounded-full">3</span>
          </a>
        </div>
      </nav>
      
      <!-- 用户信息区域 -->
      <div class="absolute bottom-0 left-0 right-0 p-4 border-t border-border bg-white">
        <div class="flex items-center">
          <img src="https://picsum.photos/id/1005/40/40" alt="用户头像" class="w-10 h-10 rounded-full object-cover border-2 border-primary-weak">
          <div class="ml-3">
            <div class="text-text-primary font-medium">管理员</div>
            <div class="text-text-muted text-xs">超级管理员</div>
          </div>
          <button class="ml-auto text-text-muted hover:text-text-primary">
            <i class="fas fa-sign-out-alt"></i>
          </button>
        </div>
      </div>
    </aside>
    
    <!-- 主内容区域 -->
    <div id="main-content" class="flex-1 flex flex-col main-content ml-60 transition-sidebar">
      <!-- 顶部导航栏 -->
      <header class="navbar flex items-center justify-between px-6">
        <!-- 左侧按钮区域 -->
        <div class="flex items-center">
          <button id="sidebar-toggle" class="lg:hidden mr-4 text-text-secondary hover:text-primary">
            <i class="fas fa-bars text-xl"></i>
          </button>
          
          <!-- 面包屑导航 -->
          <nav class="hidden md:flex items-center space-x-2 text-sm">
            <a href="#" class="breadcrumb-item">首页</a>
            <i class="fas fa-chevron-right text-xs text-text-muted"></i>
            <a href="#" class="breadcrumb-item">仪表盘</a>
            <i class="fas fa-chevron-right text-xs text-text-muted"></i>
            <span class="breadcrumb-item active">概览</span>
          </nav>
        </div>
        
        <!-- 右侧操作区域 -->
        <div class="flex items-center space-x-4">
          <!-- 搜索框 -->
          <div class="relative hidden md:block">
            <input type="text" placeholder="搜索..." class="pl-9 pr-4 py-2 rounded-md border border-border bg-bg-hover focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary w-60">
            <i class="fas fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-text-muted"></i>
          </div>
          
          <!-- 消息通知 -->
          <button class="relative p-2 text-text-secondary hover:text-primary hover:bg-bg-hover rounded-full">
            <i class="fas fa-bell text-lg"></i>
            <span class="absolute top-0 right-0 w-2 h-2 bg-danger rounded-full"></span>
          </button>
          
          <!-- 帮助中心 -->
          <button class="p-2 text-text-secondary hover:text-primary hover:bg-bg-hover rounded-full">
            <i class="fas fa-question-circle text-lg"></i>
          </button>
          
          <!-- 主题切换 -->
          <button class="p-2 text-text-secondary hover:text-primary hover:bg-bg-hover rounded-full">
            <i class="fas fa-moon text-lg"></i>
          </button>
        </div>
      </header>
      
      <!-- 内容区域 -->
      <main class="flex-1 overflow-y-auto p-6">
        <!-- 页面标题 -->
        <div class="mb-6">
          <h1 class="text-2xl font-bold text-text-primary">仪表盘概览</h1>
          <p class="text-text-muted mt-2">欢迎回来，管理员！这是您的系统运行情况概览</p>
        </div>
        
        <!-- 统计卡片 -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
          <!-- 用户统计 -->
          <div class="stat-card bg-white rounded-lg shadow-card p-6">
            <div class="flex items-center justify-between mb-4">
              <h3 class="text-text-secondary font-medium">总用户数</h3>
              <div class="w-10 h-10 rounded-full bg-primary-weak flex items-center justify-center text-primary">
                <i class="fas fa-users"></i>
              </div>
            </div>
            <div class="text-3xl font-bold text-text-primary">1,258</div>
            <div class="flex items-center mt-2 text-sm">
              <span class="text-success flex items-center"><i class="fas fa-arrow-up mr-1"></i> 8.2%</span>
              <span class="text-text-muted ml-2">较上月</span>
            </div>
          </div>
          
          <!-- 角色统计 -->
          <div class="stat-card bg-white rounded-lg shadow-card p-6">
            <div class="flex items-center justify-between mb-4">
              <h3 class="text-text-secondary font-medium">角色数量</h3>
              <div class="w-10 h-10 rounded-full bg-info/10 flex items-center justify-center text-info">
                <i class="fas fa-user-shield"></i>
              </div>
            </div>
            <div class="text-3xl font-bold text-text-primary">24</div>
            <div class="flex items-center mt-2 text-sm">
              <span class="text-success flex items-center"><i class="fas fa-arrow-up mr-1"></i> 2</span>
              <span class="text-text-muted ml-2">较上月</span>
            </div>
          </div>
          
          <!-- 文件统计 -->
          <div class="stat-card bg-white rounded-lg shadow-card p-6">
            <div class="flex items-center justify-between mb-4">
              <h3 class="text-text-secondary font-medium">文件总量</h3>
              <div class="w-10 h-10 rounded-full bg-success/10 flex items-center justify-center text-success">
                <i class="fas fa-file-alt"></i>
              </div>
            </div>
            <div class="text-3xl font-bold text-text-primary">3,782</div>
            <div class="flex items-center mt-2 text-sm">
              <span class="text-success flex items-center"><i class="fas fa-arrow-up mr-1"></i> 12.5%</span>
              <span class="text-text-muted ml-2">较上月</span>
            </div>
          </div>
          
          <!-- 存储空间 -->
          <div class="stat-card bg-white rounded-lg shadow-card p-6">
            <div class="flex items-center justify-between mb-4">
              <h3 class="text-text-secondary font-medium">存储空间</h3>
              <div class="w-10 h-10 rounded-full bg-warning/10 flex items-center justify-center text-warning">
                <i class="fas fa-hdd"></i>
              </div>
            </div>
            <div class="text-3xl font-bold text-text-primary">85.2%</div>
            <div class="flex items-center mt-2 text-sm">
              <span class="text-danger flex items-center"><i class="fas fa-arrow-up mr-1"></i> 5.3%</span>
              <span class="text-text-muted ml-2">较上月</span>
            </div>
          </div>
        </div>
        
        <!-- 图表区域 -->
        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
          <!-- 用户增长图表 -->
          <div class="bg-white rounded-lg shadow-card p-6 lg:col-span-2">
            <div class="flex items-center justify-between mb-4">
              <h3 class="font-semibold text-text-primary">用户增长趋势</h3>
              <div class="flex space-x-2">
                <button class="px-3 py-1 text-sm rounded-md bg-bg-hover text-text-secondary hover:text-primary">本周</button>
                <button class="px-3 py-1 text-sm rounded-md bg-primary-weak text-primary">本月</button>
                <button class="px-3 py-1 text-sm rounded-md bg-bg-hover text-text-secondary hover:text-primary">本年</button>
              </div>
            </div>
            <div class="h-64">
              <canvas id="userGrowthChart"></canvas>
            </div>
          </div>
          
          <!-- 用户分布图表 -->
          <div class="bg-white rounded-lg shadow-card p-6">
            <div class="flex items-center justify-between mb-4">
              <h3 class="font-semibold text-text-primary">用户角色分布</h3>
              <button class="text-text-muted hover:text-primary">
                <i class="fas fa-ellipsis-v"></i>
              </button>
            </div>
            <div class="h-64">
              <canvas id="userRoleChart"></canvas>
            </div>
          </div>
        </div>
        
        <!-- 最近活动表格 -->
        <div class="bg-white rounded-lg shadow-card p-6">
          <div class="flex items-center justify-between mb-6">
            <h3 class="font-semibold text-text-primary">最近活动日志</h3>
            <button class="text-primary hover:text-primary-hover">查看全部</button>
          </div>
          
          <div class="overflow-x-auto">
            <table class="w-full">
              <thead>
                <tr class="border-b border-border">
                  <th class="text-left py-3 px-4 font-semibold text-text-secondary text-sm">用户</th>
                  <th class="text-left py-3 px-4 font-semibold text-text-secondary text-sm">操作</th>
                  <th class="text-left py-3 px-4 font-semibold text-text-secondary text-sm">时间</th>
                  <th class="text-left py-3 px-4 font-semibold text-text-secondary text-sm">IP地址</th>
                  <th class="text-left py-3 px-4 font-semibold text-text-secondary text-sm">状态</th>
                </tr>
              </thead>
              <tbody>
                <tr class="table-row border-b border-border animate-fadeIn">
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1005/32/32" alt="用户头像" class="w-8 h-8 rounded-full mr-2">
                      <span class="font-medium">张三</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-text-secondary">登录系统</td>
                  <td class="py-3 px-4 text-text-muted">2023-06-15 14:30:25</td>
                  <td class="py-3 px-4 text-text-muted">192.168.1.100</td>
                  <td class="py-3 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">成功</span>
                  </td>
                </tr>
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.1s">
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1012/32/32" alt="用户头像" class="w-8 h-8 rounded-full mr-2">
                      <span class="font-medium">李四</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-text-secondary">创建新用户</td>
                  <td class="py-3 px-4 text-text-muted">2023-06-15 13:15:42</td>
                  <td class="py-3 px-4 text-text-muted">192.168.1.101</td>
                  <td class="py-3 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">成功</span>
                  </td>
                </tr>
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.2s">
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1025/32/32" alt="用户头像" class="w-8 h-8 rounded-full mr-2">
                      <span class="font-medium">王五</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-text-secondary">修改角色权限</td>
                  <td class="py-3 px-4 text-text-muted">2023-06-15 12:08:37</td>
                  <td class="py-3 px-4 text-text-muted">192.168.1.102</td>
                  <td class="py-3 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">成功</span>
                  </td>
                </tr>
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.3s">
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1027/32/32" alt="用户头像" class="w-8 h-8 rounded-full mr-2">
                      <span class="font-medium">赵六</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-text-secondary">上传文件</td>
                  <td class="py-3 px-4 text-text-muted">2023-06-15 10:55:18</td>
                  <td class="py-3 px-4 text-text-muted">192.168.1.103</td>
                  <td class="py-3 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-danger/10 text-danger">失败</span>
                  </td>
                </tr>
                <tr class="table-row animate-fadeIn" style="animation-delay: 0.4s">
                  <td class="py-3 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1074/32/32" alt="用户头像" class="w-8 h-8 rounded-full mr-2">
                      <span class="font-medium">钱七</span>
                    </div>
                  </td>
                  <td class="py-3 px-4 text-text-secondary">修改系统设置</td>
                  <td class="py-3 px-4 text-text-muted">2023-06-15 09:42:01</td>
                  <td class="py-3 px-4 text-text-muted">192.168.1.104</td>
                  <td class="py-3 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">成功</span>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </main>
    </div>
  </div>
  
  <!-- 引入Chart.js -->
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  
  <!-- 页面交互脚本 -->
  <script>
    // 侧边栏切换
    document.getElementById('sidebar-toggle').addEventListener('click', function() {
      const sidebar = document.getElementById('sidebar');
      sidebar.classList.toggle('open');
    });
    
    // 用户增长趋势图表
    const userGrowthCtx = document.getElementById('userGrowthChart').getContext('2d');
    new Chart(userGrowthCtx, {
      type: 'line',
      data: {
        labels: ['1月', '2月', '3月', '4月', '5月', '6月'],
        datasets: [
          {
            label: '新增用户',
            data: [120, 190, 180, 250, 320, 450],
            borderColor: '#5e7be2',
            backgroundColor: 'rgba(94, 123, 226, 0.1)',
            tension: 0.4,
            fill: true
          },
          {
            label: '活跃用户',
            data: [320, 450, 480, 650, 820, 1050],
            borderColor: '#22c55e',
            backgroundColor: 'rgba(34, 197, 94, 0.1)',
            tension: 0.4,
            fill: true
          }
        ]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'top',
            labels: {
              boxWidth: 12,
              usePointStyle: true,
              pointStyle: 'circle'
            }
          }
        },
        scales: {
          y: {
            beginAtZero: true,
            grid: {
              color: 'rgba(15, 23, 42, 0.05)'
            }
          },
          x: {
            grid: {
              display: false
            }
          }
        }
      }
    });
    
    // 用户角色分布图表
    const userRoleCtx = document.getElementById('userRoleChart').getContext('2d');
    new Chart(userRoleCtx, {
      type: 'doughnut',
      data: {
        labels: ['管理员', '部门主管', '普通员工', '访客'],
        datasets: [
          {
            data: [10, 20, 60, 10],
            backgroundColor: ['#5e7be2', '#3b82f6', '#22c55e', '#f59e0b'],
            borderWidth: 0,
            hoverOffset: 10
          }
        ]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'bottom',
            labels: {
              boxWidth: 12,
              usePointStyle: true,
              pointStyle: 'circle',
              padding: 15
            }
          }
        },
        cutout: '70%'
      }
    });
    
    // 模拟数据加载动画
    document.addEventListener('DOMContentLoaded', function() {
      // 这里可以添加数据加载完成后的交互逻辑
      console.log('Kexio管理系统原型页面加载完成');
    });
  </script>
</body>
</html>